/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tkatva.tt.smx.monitor.ui

import com.vaadin.Application
import com.vaadin.ui.Button
import com.vaadin.ui.Window
import com.vaadin.ui.Label
import com.vaadin.ui.HorizontalSplitPanel
import com.vaadin.ui.VerticalSplitPanel
import com.vaadin.ui.HorizontalLayout
import com.vaadin.ui.VerticalLayout
import com.vaadin.ui.Panel

class SmxMonitorApplication extends Application
{
  private var window : Window = null
  private var main : HorizontalLayout = null
  private var left : VerticalLayout = null
  private var lblLayout : VerticalLayout = null
  private var rPanel : Panel = null
  
    override def init() =
    {
      
        //Move this to another class 
        window = new Window("SmxMonitorApplication")
        setMainWindow(window)
        main = new HorizontalLayout
        main.setSizeFull
        window.setContent(main)
        
        rPanel = new Panel
        rPanel.setHeight("100%")
        rPanel.setWidth(null)
        rPanel.getContent.setSizeUndefined
        
        
    lblLayout = new VerticalLayout
    lblLayout.addComponent(new Label("Panel label"))
    lblLayout.addComponent(new Label("Panel label2"))
    
    
    
    rPanel.addComponent(lblLayout)
    
    main.addComponent(rPanel)
    
    left = new VerticalLayout
    left.setSizeFull
    main.addComponent(left)
    main.setExpandRatio(left, 1.0f)
    left.addComponent(new Label("Left vertical layout"))
        
    }
}
